<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>所有用户列表</title>
</head>
<body>
<h1>所有用户列表</h1>
<c:if test="${empty model}">
    <h3>数据库未查询到用户,<a href="/page/add">点击</a>跳转到添加用户界面</h3>
</c:if>
<c:if test="${!empty model}">
    <table border="1">
        <tr>
            <th>uuid</th>
            <td>名称</td>
            <td>生日</td>
        </tr>
        <c:forEach items="${model}" var="user">
            <tr>
                <td>${user.uuid}</td>
                <td>${user.name}</td>
                <td>${user.birthday}</td>
            </tr>
        </c:forEach>
    </table>
    <hr>
    <a href="/page/add">添加用户</a>
    <hr>
    <form action="/user/delete" method="post">
        <label for="user-id">输入要删除的用户uuid
        </label>
        <input name="id" value="" id="user-id">
        <input type="submit" value="删除用户">
    </form>
</c:if>

</body>
</html>
